package com.huawei.appgallery.forum.posts.buoy.action;

import android.app.Activity;
import com.huawei.appgallery.assistantdock.base.externalaction.openviewaction.IOpenViewAction;
import com.huawei.appgallery.common.media.api.IImagePreviewProtocol;
import com.huawei.secure.android.common.intent.SafeIntent;
import java.util.ArrayList;
import o.bqx;
import o.dys.a;
import o.fho;
import o.fiu;
import o.fjb;

public class OpenPostContentImageAction extends IOpenViewAction {
    public static final String ACTION_OPEN_FORUM_POST_CONTENT_IMAGE = "com.huawei.gamebox.ACTION_OPEN_FORUM_POST__CONTENT_IMAGE";
    public static final String BUNDLE_INDEX = "Index";
    public static final String BUNDLE_PIC_URI_LIST = "PicUrlList";
    public static final String BUNDLE_SDCARD_DIR = "SdCardDir";
    private static final String TAG = "OpenPostContentImageAction";

    public OpenPostContentImageAction(a aVar, SafeIntent safeIntent) {
        super(aVar, safeIntent);
    }

    public void onAction() {
        bqx.ˏ(TAG, "onAction");
        if (this.callback instanceof Activity) {
            fjb ˎ = fho.ˏ().ˋ("Media").ˎ("ImagePreview");
            IImagePreviewProtocol iImagePreviewProtocol = (IImagePreviewProtocol) ˎ.ˊ();
            iImagePreviewProtocol.setSavePath(this.intent.getStringExtra(BUNDLE_SDCARD_DIR));
            iImagePreviewProtocol.setOffset(this.intent.getIntExtra(BUNDLE_INDEX, 0));
            iImagePreviewProtocol.setImageBeans((ArrayList) this.intent.getSerializableExtra(BUNDLE_PIC_URI_LIST));
            fiu.ˊ().ˏ((Activity) this.callback, ˎ);
        }
    }
}
